package com.example.plugin.serviceimp;

import com.example.plugin.mapper.UserDao;
import com.example.plugin.entity.User;
import com.example.plugin.service.ServiceInterface;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;

@Service
public class UserService implements ServiceInterface {
    @Resource
    UserDao userDao;
    public int insert(User user){
        return userDao.insert(user);
    }
    public String selectByPrimaryKey(int id){
        User u=userDao.selectByPrimaryKey(id);
        return u.getUserName();
       // return userDao.selectByPrimaryKey(id).getUserName();
    }
}
